﻿function SwitchImages()
{
	this.pic_width = 252; //图片宽度
	this.pic_height= 336; //图片高度
	this.button_pos= 4; //按扭位置 1左 2右 3上 4下
	this.stop_time = 5000; //图片停留时间(1000为1秒钟)
	this.show_text = 0; //是否显示文字标签 1显示 0不显示
	this.txtcolor  = "000000"; //文字色
	this.bgcolor   = "DDDDDD"; //背景色
	this.swf = "/ImgDNS/PageZone/swf/focus.swf";	//Flash框架

	this.imag = new Array();
	this.link = new Array();
	this.text = new Array();

	//可编辑内容结束
	this.show = function()
	{
		var swf_height = (this.show_text == 1) ? this.pic_height + 20 : this.pic_height;
		var pics="", links="", texts="";
		for(var i=1; i< this.imag.length; i++){
			pics=pics+("|"+ this.imag[i]);
			links=links+("|"+ this.link[i]);
			texts=texts+("|"+ this.text[i]);
		}
		pics=pics.substring(1);
		links=links.substring(1);
		texts=texts.substring(1);
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ this.pic_width +'" height="'+ swf_height +'">');
		document.write('<param name="movie" value="' + this.swf + '">');
		document.write('<param name="quality" value="high"><param name="wmode" value="opaque">');
		document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&pic_width='+this.pic_width+'&pic_height='+this.pic_height+'&show_text='+this.show_text+'&txtcolor='+this.txtcolor+'&bgcolor='+this.bgcolor+'&button_pos='+this.button_pos+'&stop_time='+this.stop_time+'">');
		document.write('<embed src="' + this.swf + '" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&pic_width='+this.pic_width+'&pic_height='+this.pic_height+'&show_text='+this.show_text+'&txtcolor='+this.txtcolor+'&bgcolor='+this.bgcolor+'&button_pos='+this.button_pos+'&stop_time='+this.stop_time+'" quality="high" width="'+ this.pic_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		document.write('</object>');
	}
}